package com.kfm.base.thread.day03;

public class Demo20 {

    public static void main(String[] args) {

        Thread thread = new Thread(() -> {
            ThreadLocal<Integer> threadLocal1 = new ThreadLocal<>();
            threadLocal1.set(10);
        });

        thread.start();

        try {
            thread.join();
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        }

        ThreadLocal<Integer> threadLocal = new ThreadLocal<>();

        System.out.println(threadLocal.get());
    }
}
